package com.example.mould.api.web;

import com.example.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 *
 * @author dj
 * Date: 2018/2/7
 * Time: 14:34
 */
@RestController
public class IndexController {

    @Value("${server.port}")
    String port;

    @RequestMapping("/hi")
    public R home(@RequestParam String name) {
        return R.ok().put("port", port).put("name", name);
    }
}
